package com.jlcloud.core.log.props;

import lombok.Getter;
import lombok.Setter;
import com.jlcloud.core.launch.log.JlCloudLogLevel;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.ArrayList;
import java.util.List;

/**
 * 日志配置
 *
 * @author By: JlCloud <br>
 * @Package: com.jlcloud <br>
 * @CreateTime: 2024-12-03 21:45 <br>
 * @Copyright: 2021 www.jilianjituan.com Inc. All rights reserved. <br>
 * @Caution 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的 <br>
 */
@Getter
@Setter
@RefreshScope
@ConfigurationProperties(JlCloudLogLevel.REQ_LOG_PROPS_PREFIX)
public class JlCloudRequestLogProperties {

	/**
	 * 是否开启请求日志
	 */
	private Boolean enabled = true;

	/**
	 * 是否开启异常日志推送
	 */
	private Boolean errorLog = true;

	/**
	 * 是否开启日志追踪设置
	 */
	private Boolean traceLog = true;

	/**
	 * 日志级别配置，默认：BODY
	 */
	private JlCloudLogLevel level = JlCloudLogLevel.BODY;

	/**
	 * 放行url
	 */
	private List<String> skipUrl = new ArrayList<>();
}
